package cn.com.jonpad.cfgbeans;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author user
 */
@Configuration
@EnableFeignClients(basePackages = "cn.com.jonpad.service")
@ComponentScan("cn.com.jonpad.service")
public class ConfigBean {
	/**
	 * 获得Rest时加入Ribbon的配置
	 * @return
	 */
	@Bean
	@LoadBalanced
	public RestTemplate getRestTemplate()
	{
		return new RestTemplate();
	}

}
